package br.com.rookgraph;


/**
 * Representação de uma aresta.
 *
 * @author Luan Pontes
 * @singe 16-10-12
 *
 */
public class Edge {

	public int origin;
	public int target;

	public int alfa;
	public int sigma;
	public int sigmaLine;

	public int beta;
	public int gama;
	
	public int weight;

	public Edge(int origin, int target, int weight) {
		this.target = target;
		this.origin = origin;
		this.weight = weight;
	}
	
	public Edge(int origin, int target) {
		this.target = target;
		this.origin = origin;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Edge) {
			Edge other = (Edge) obj;

			return (this.origin == other.origin && this.target == other.target)
					|| (this.origin == other.target && this.target == other.origin);
		}

		return false;
	}

	@Override
	public String toString() {
		// int ganho = this.delta+this.grauLeader+this.sigma;
		return this.origin +"<--->"+this.target
				+" (alfa = "+this.alfa
				+" beta = "+this.beta
				+" gama = "+this.gama
				+" sigma = "+this.sigma							
				+" sigmaLinha = "+this.sigmaLine+")";
		//	+" Ganho = "+ganho;
	}
}